﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection.Controller;
using System.Reflection;

namespace Pixysoft.Framework.Reflection.Core
{
    internal delegate object DynamicConstructorInfoHandler(object[] parameters);

    class DynamicConstructorInfo : IDynamicConstructorInfo
    {
        DynamicConstructorInfoHandler handler = null;

        public DynamicConstructorInfo(DynamicConstructorInfoHandler handler)
        {
            this.handler = handler;
        }

        public object Invoke()
        {
            return this.handler(null);
        }

        public object Invoke(object[] parameters)
        {
            return this.handler(parameters);
        }
    }
}
